
import api from '../../api/index'
import { getArea } from '../../utils/index'
import { config } from '../../config'


Component({

  /**
   * 组件的属性列表
   */
  properties: {
    user: {
      type: Object,
      value: {}
    },
    photoList: {
      type: Array,
      value: []
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    basePath: config().baseUrl,
    year: ''
  },
  ready: function(){
    let loginTimer =  setInterval(() => {
      if(!wx.$isNull(this.data.user)){
        let bd = this.data.user.birthday
        console.log(bd)
        if(!wx.$isNull(bd)){
          let bds = bd.split('-')
          let year = bds[0].substring(bds[0].length -2) + '年'
          this.setData({
            year: year
          })
        }
        clearInterval(loginTimer)
      }else{
        console.log('没取到')
      }
    },200)
  },
  /**
   * 组件的方法列表
   */
  methods: {

  }
})